Skip to content

Including PUAs no longer works#1585

Open
ryan-esty wants to merge 1 commit intoCisco-Talos:mainfrom
ryan-esty:fixing_puaincludes
Open

Including PUAs no longer works#1585
ryan-esty wants to merge 1 commit intoCisco-Talos:mainfrom
ryan-esty:fixing_puaincludes

Conversation

@ryan-esty
Copy link
Copy Markdown

@ryan-esty ryan-esty commented Oct 2, 2025

In cli_chkpua when looking for the cat in pua_cats in strstr the parameters are backwards. Before it was looking for pua_cats in cat and failing.

Found by enabling debug and seeing when I asked for specific PUAs they were skipped: ./obj-x86_64-linux-gnu/clamscan/clamscan --debug --detect-pua --include-pua=Pdf.Trojan --include-pua=Pdf.Exploit mypdf.pdf > out.txt 2>&1 out.txt; grep PUA.Pdf out.txt |grep Skipping
LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.OpenActionObjectwithJavascript-1 - excluded category .Pdf.Trojan. LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.OpenActionObjectwithJS-1 - excluded category .Pdf.Trojan. LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.CVE_2013_0622-1 - excluded category .Pdf.Trojan. LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.EmbeddedFile-1 - excluded category .Pdf.Trojan. LibClamAV debug: cli_loadldb: Skipping PUA signature PUA.Pdf.Trojan.EmbeddedFile-1 LibClamAV debug: Skipping PUA signature PUA.Pdf.Exploit.CVE_2013_0624-4255860-2 - excluded category .Pdf.Exploit. LibClamAV debug: cli_loadldb: Skipping PUA signature PUA.Pdf.Exploit.CVE_2013_0624-4255860-2

After the fix
./obj-x86_64-linux-gnu/clamscan/clamscan --debug --detect-pua --include-pua=Pdf.Trojan --include-pua=Pdf.Exploit mypdf.pdf > out.txt 2>&1 out.txt; grep PUA.Pdf out.txt |grep Skipping # doesn't return anything

In cli_chkpua when looking for the cat in pua_cats in strstr the parameters are backwards. Before it was looking for pua_cats in cat and failing.

Found by enabling debug and seeing when I asked for specific PUAs they were skipped:
./obj-x86_64-linux-gnu/clamscan/clamscan --debug --detect-pua --include-pua=PUA.Pdf.Exploit  --include-pua=PUA.Pdf.Trojan mypdf.pdf > out.txt 2>&1 out.txt
grep PUA.Pdf out.txt |grep Skipping
LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.OpenActionObjectwithJavascript-1 - excluded category .Pdf.Trojan.
LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.OpenActionObjectwithJS-1 - excluded category .Pdf.Trojan.
LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.CVE_2013_0622-1 - excluded category .Pdf.Trojan.
LibClamAV debug: Skipping PUA signature PUA.Pdf.Trojan.EmbeddedFile-1 - excluded category .Pdf.Trojan.
LibClamAV debug: cli_loadldb: Skipping PUA signature PUA.Pdf.Trojan.EmbeddedFile-1
LibClamAV debug: Skipping PUA signature PUA.Pdf.Exploit.CVE_2013_0624-4255860-2 - excluded category .Pdf.Exploit.
LibClamAV debug: cli_loadldb: Skipping PUA signature PUA.Pdf.Exploit.CVE_2013_0624-4255860-2

After the fix
./obj-x86_64-linux-gnu/clamscan/clamscan --debug --detect-pua --include-pua=PUA.Pdf.Exploit  --include-pua=PUA.Pdf.Trojan mypdf.pdf > out.txt 2>&1 out.txt
grep PUA.Pdf out.txt |grep Skipping # doesn't return anything
@val-ms
Copy link
Copy Markdown
Contributor

val-ms commented Oct 3, 2025

Thank you for the bug fix. I will review this next week. I am presently preparing to publish the 1.5.0 early next week and won't be able to test and merge this until after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants